package Shapes;

public class main {
    public static void main(String[] args) {
        Shape[]shapes=new Shape[6];
        shapes[0]=new Circle("圆形1",6);
        shapes[1]=new Circle("圆形2",3.6);
        shapes[2]=new Circle("圆形3",11);
        shapes[3]=new Rectangle("矩形1",8.5,51.3);
        shapes[4]=new Rectangle("矩形2",3,2.24);
        shapes[5]=new Rectangle("矩形3",7,11.04);

        //遍历数组，甲酸输出每个形状的面积
        for(int i=0;i<6;i++){
            System.out.println(shapes[i].square+"面积："+shapes[i].calculateArea());
        }
    }
}
